<%@page import="java.util.ArrayList"%>
<%@page import="com.project1.cmpe473.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
		if(request.getAttribute("error")!=null)
		{
	%>
	ERROR:
	<%= request.getAttribute("error").toString() %>
	<%
		}
	%>
<h2>Company Form</h2>
<form method="post" action="CompanyForm"  >
	<table>
		<tr>
			<td>Company Name:</td>
			<td><input type="text" name="name" >*</td>
		</tr>
		<tr>
			<td colspan="2"><hr></td>
		</tr>
		<tr>
			<td>University:</td>
			<td><input type="text" name="university"></td>
		</tr>
		<tr>
			<td>Minimum GPA:</td>
			<td><input type="text" name="gpa" ></td>
		</tr>
		<tr>
			<td>Minimum Degree:</td>
			<td>
				BS<input type="radio" name="degree" value="1" checked="checked" >&nbsp;
				MS<input type="radio" name="degree" value="2" >&nbsp;
				PHD<input type="radio" name="degree" value="3" >
			</td>
		</tr>
		<tr>
			<td>Minimum Experience(year):</td>
			<td><input type="text" name="experience" ></td>
		</tr>
		<tr>
			<td>Gender:</td>
			<td> 
				Male<input type="checkbox" name="gender" value="male" checked="checked" >&nbsp;
				Female<input type="checkbox" name="gender" value="female" checked="checked"> 
			</td>
			
		</tr>
	</table>
	<input type="submit">
</form>
	<table>
		<tr>
			<td >ID</td>
			<td >Name</td>
			<td >University</td>
			<td >Min.GPA</td>
			<td>Min.Degree</td>
			<td >Min.Exp</td>
			<td >Gender</td>
		</tr>
		<tr>
		<td colspan="7"><hr></td>
		
	<%
		for(Company company : CompanyForm.companyList)
		{
			
			%>
			<tr>
			<td width="10%"> <%= company.id %></td>
			<td width="10%"> <%= company.name %></td>
			<td width="10%"> <%= company.univeristy %></td>
			<td width="10%"> <%= company.gpa %></td>
			<td width="10%"> <%= company.degree %></td>
			<td width="10%"> <%= company.experience %></td>
			<td width="10%"> <%= company.genders %></td>
			</tr>
	<%
		}
	%>
	</table>
</body>
</html>